Skip to content

Conversation

@iuwqyir
Copy link
Contributor

@iuwqyir iuwqyir commented Oct 9, 2024

TL;DR

Makes /openapi.json return the same as /swagger/docs.json

What changed?

  • Modified the /openapi.json endpoint to dynamically serve Swagger documentation.
  • Replaced static file serving with dynamic generation of Swagger documentation.

How to test?

  1. Start the API server.
  2. Navigate to the /openapi.json endpoint.
  3. Verify that the Swagger documentation is served correctly.

Why make this change?

This change improves the flexibility and reliability of Swagger documentation serving. By dynamically generating the documentation, it ensures that the API always serves the most up-to-date version without relying on static files. The added error handling also improves the robustness of the API, providing clear feedback if there are issues with the Swagger documentation.

Copy link
Contributor Author

iuwqyir commented Oct 9, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @iuwqyir and the rest of your teammates on Graphite Graphite

@iuwqyir iuwqyir changed the title make openapi.json return the same as swagger/doc.json Improve Swagger documentation serving and error handling Oct 9, 2024
@iuwqyir iuwqyir changed the title Improve Swagger documentation serving and error handling Update Swagger documentation handling in the API Oct 9, 2024
@iuwqyir iuwqyir marked this pull request as ready for review October 9, 2024 21:29
@iuwqyir iuwqyir merged commit 13398d9 into main Oct 10, 2024
4 checks passed
@iuwqyir iuwqyir deleted the 10-10-make_openapi.json_return_the_same_as_swagger_doc.json branch October 10, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants